package com.crazyhat.crazyhat.anno;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import com.auth0.jwt.interfaces.Payload;
import com.crazyhat.crazyhat.vaildation.SensitiveWordValidation;

import jakarta.validation.Constraint;

/**
 * 敏感词校验注解
 */
@Documented
@Target({ ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = SensitiveWordValidation.class)
public @interface SensitiveWordAnno {
    
    /**
     * 校验失败提示信息
     * @return
     */
    String message() default "{内容中含有敏感词}";

    /**
     * 指定分组
     * @return
     */
	Class<?>[] groups() default { };

	Class<? extends Payload>[] payload() default { };
}
